/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

#ifndef MK_RTMP_PUBLISHER_SOURCE_H
#define MK_RTMP_PUBLISHER_SOURCE_H
#include "MkMedia/MkMediaSource.h"
#include "MkAmf/MkAmf.h"

class CMkRtmpSession;
class MkApi CMkRtmpPublisherSource : public CMkMediaSource
{
public:
    CMkRtmpPublisherSource(CMkRtmpSession* pSession);
    virtual ~CMkRtmpPublisherSource();

    Uint32 InputVideo(const Uint8* pBuf, Uint32 nLen, Uint32 TimeStamp);
    Uint32 InputAudio(const Uint8* pBuf, Uint32 nLen, Uint32 TimeStamp);
    Uint32 InputSetDataFrame(const MkVector<MkAmfObject>& VecObj);
    void NoneRtmpSession() { m_pSession = nullptr; }
protected:
    Uint32 StopMediaSource() override;
private:
    CMkRtmpSession*                 m_pSession;
};




#endif